/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pt.isel.lensesws;

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author c0rp
 */
@WebService(serviceName = "LensesWS")
public class LensesWS {

    public enum Astigmatic {

        YES("yes"),
        NO("no");
        private final String value;

        private Astigmatic(String value) {
            this.value = value;
        }

        String getAstigmatic() {
            return value;
        }
    }

    @WebMethod(operationName = "getLensesType")
    public String getLensesType(@WebParam(name = "Astigmatic") Astigmatic a) {
        if (a == Astigmatic.YES) {
            return "Soft";
        } else {
            return "Hard";
        }
    }
}
